﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLL.BusinessRules;

namespace BLL
{
    public class DMHANGHOA:BusinessObject
    {
        public string MaHangHoa { get; set; }
        public string TenHangHoa { get; set; }
        public int? MaDonViTinh { get; set; }
        public decimal? DonGia { get; set; }
        public bool? IsUse { get; set; }
        public bool? IsDelete { get; set; }
        public int? CreateBy { get; set; }
        public int? ModifiedBy { get; set; }
        public DateTime? ModifiedOn { get; set; }

        public List<DMDONVITINH> lstDonViTinh = new List<DMDONVITINH>();

        public DMHANGHOA()
        {
            AddRule(new ValidateRequired("MaHangHoa"));
            AddRule(new ValidateRequired("TenHangHoa"));
        }

        public DMHANGHOA(string maHangHoa, string tenHangHoa, int? maDonViTinh, decimal? donGia, bool? isUse, bool? isDelete, int? createBy, int? modifiedBy, DateTime? modifiedOn)
            : this()
        {
            MaHangHoa = maHangHoa;
            TenHangHoa = tenHangHoa;
            MaDonViTinh = maDonViTinh;
            DonGia = donGia;
            IsUse = isUse;
            IsDelete = isDelete;
            CreateBy = createBy;
            ModifiedBy = modifiedBy;
            ModifiedOn = modifiedOn;
        }
    }
}
